package com.natasha.pins.component.database;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import com.natasha.pins.data.bean.PinsMasterBean;

public class DBHelper extends SQLiteOpenHelper{

	public DBHelper(Context context) {
		super(context, DBConstants.getDatabaseName(), null, DBConstants.getDatabaseVersion());
	}
	
	@Override
	public void onCreate(SQLiteDatabase sqLiteDatabase){
		sqLiteDatabase.execSQL(PinsMasterBean.QRY_CREATE_PINS_MASTER);
	}
	
	@Override
	public void onUpgrade(SQLiteDatabase sqLiteDatabase, int oldVersion, int newVersion){
		if (oldVersion < 2) {
            //sqLiteDatabase.execSQL(PinsMasterBean.QRY_DROP_PINS_MASTER);
            //sqLiteDatabase.execSQL(PinsMasterBean.QRY_CREATE_PINS_MASTER);
        }
	}
}
